﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm_Logo.aspx.cs" Inherits="WMS6.Web.WebForm_Logo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>PowerWMS6</title>
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <link href="style/zh/1/css.css" rel="stylesheet" type="text/css" id="mycss" />
    <link href="Css/style.css" type="text/css" rel="stylesheet" />
    <script src="Js/jquery.js" type="text/javascript"></script>   
    <script src="Js/jquery.simplemodal.js" type="text/javascript"></script>
	<script src="Js/util.js" type="text/javascript"></script>
    <script src="Js/InitPage.js" type="text/javascript"></script>
    <script type="text/javascript">
                
        //初始化页面
        window.onload = function windowLoad() {
            var sy = getRequest('style');
            var lg = getRequest('lang');

            //获取用户所选皮肤
            if (sy != "" && sy != null && sy.toString() != "undefined") {
                document.getElementById("henPerfStyle").value = sy;
            }

            //获取用户所选语言
            if (lg != "" && lg != null && lg.toString() != "undefined") {
                document.getElementById("hdnPerfLanguage").value = lg;
            }

            initLogoPage();

            var tempLang = document.getElementById("hdnPerfLanguage").value;
            var tempStyle = document.getElementById("henPerfStyle").value;

           //如果不是第3、8种样式把四个边框隐藏掉
              if(tempStyle ==8)
             {
              //第8种样式
                 parent.document.all.frame.parentElement.parentElement.rows = "0,*,8";
                 parent.document.all.frame.parentElement.parentElement.parentElement.cols = "7,*,7";
             }
            else if (tempStyle != 3) {
                 //把四个边框隐藏掉
                 parent.document.all.frame.parentElement.parentElement.rows = "0,*,0";
                 parent.document.all.frame.parentElement.parentElement.parentElement.cols = "0,*,0";
             }             
             else {
                 //把四个边框显示出来
                 parent.document.all.frame.parentElement.parentElement.rows = "10,*,10";
                 parent.document.all.frame.parentElement.parentElement.parentElement.cols = "10,*,10";
             }
             

            setTimeout("styleLoad('"+tempLang+"', '"+tempStyle+"')",1000);
            
            //如果是繁体中文字体 则加载不同的图片按钮文件
            if(document.getElementById("hdnFullLanguageOption").value.toLowerCase() == "zh-tw")
            {
                document.getElementById("warehouse").style.backgroundImage = "url(style/" + tempLang + "/" + tempStyle + "/images/warehouse_tw.gif)";
                document.getElementById("logout").style.backgroundImage = "url(style/" + tempLang + "/" + tempStyle + "/images/logout_tw.gif)";
                document.getElementById("help").style.backgroundImage = "url(style/" + tempLang + "/" + tempStyle + "/images/help_tw.gif)";
                document.getElementById("about").style.backgroundImage = "url(style/" + tempLang + "/" + tempStyle + "/images/about_tw.gif)";
            }
        }


        function styleLoad(tempLang, tempStyle) {
        if(tempStyle == 3 || tempStyle == 8)
        {
          try {
                //设置左边框的样式
                self.parent.parent.parent.parent.frames["leftFrame"].document.getElementById("mycss").href="style/" + tempLang + "/" + tempStyle + "/css.css";
               
         
                //设置上边框的样式
                self.parent.parent.parent.frames["topFrame"].document.getElementById("mycss").href="style/" + tempLang + "/" + tempStyle + "/css.css";
             
            
                //设置下边框的样式
                self.parent.parent.parent.frames["bottomFrame"].document.getElementById("mycss").href="style/" + tempLang + "/" + tempStyle + "/css.css";
         
               
                //设置右边框的样式
                self.parent.parent.parent.parent.frames["rightFrame"].document.getElementById("mycss").href="style/" + tempLang + "/" + tempStyle + "/css.css";
               
                 }
            catch (e)  
            {
            alert(e);
             }
          }
            try {
                //设置分隔线的样式
                self.parent.frames["border"].document.getElementById("mycss").setAttribute("href", "style/" + tempLang + "/" + tempStyle + "/css.css");
         
                 }
            catch (e) {
            }
            try {
                //设置菜单的样式
                self.parent.frames["contents"].document.getElementById("mycss").setAttribute("href", "style/" + tempLang + "/" + tempStyle + "/css.css");
            }
            catch (e) {
            }
        
        }
		function hideshow()
		{  
		
		 if(parent.frames['border'].document.getElementById('hdnType').value == "0")
           {
	           if(parent.document.all.frame.cols == "156,7,85%")
		        {
			        if(parent.frames[3].document.getElementById('autodiv') == "[object]")
			        {
				        parent.frames[3].document.getElementById('autodiv').style.width = "100%";
			        }
			        if(parent.frames[3].document.getElementById('autodiv_input') == "[object]")
			        {
				        parent.frames[3].document.getElementById('autodiv_input').style.width = "100%";
			        }
			        if(parent.frames[3].document.getElementById('top_input') == "[object]")
			        {
				        parent.frames[3].document.getElementById('top_input').style.width = "100%";
			        }
    					 parent.frames['border'].document.getElementById('flag').className = "switch1";
		        }
		        else
		        {
			        if(parent.frames[3].document.getElementById('autodiv') == "[object]")
			        {
				        parent.frames[3].document.getElementById('autodiv').style.width = "850px"; 
			        } 
			        if(parent.frames[3].document.getElementById('autodiv_input') == "object")
			        {
				        parent.frames[3].document.getElementById('autodiv_input').style.width =  "850px"; 
			        }    
			        if(parent.frames[3].document.getElementById('top_input') == "[object]")
			        {
				        parent.frames[3].document.getElementById('top_input').style.width = "850px"; 
			        }   
			           parent.frames['border'].document.getElementById('flag').className = "switch";         
		        }                
		        parent.document.all.frame.cols   =   parent.document.all.frame.cols   =="0,7,*" ? "156,7,85%" : "0,7,*";  
		    }
		 }   
                 
		function changeDivHeight()
		{
		   
		   
		   if(parent.frames[2].document.getElementById('tablebar').style.display == "block")
		   {
				if(parent.frames[2].document.getElementById('autodiv')=="[object]")
				{
					parent.frames[2].document.getElementById('autodiv').style.height = "100%";
				}
				if(parent.frames[2].document.getElementById('autodiv_input')=="[object]")
				{
					parent.frames[2].document.getElementById('autodiv_input').style.height = "100%";
				}
				parent.frames[2].document.getElementById('tablebar').style.display = "none";
				
				
		   }
		   else
		   {
				if(parent.frames[2].document.getElementById('autodiv')=="[object]")
				{
					parent.frames[2].document.getElementById('autodiv').style.height = "400px";
				}
				if(parent.frames[2].document.getElementById('autodiv_input')=="[object]")
				{
					parent.frames[2].document.getElementById('autodiv_input').style.height = "400px";
				}
				parent.frames[2].document.getElementById('tablebar').style.display = "block";
		   }
	  
			
		}
                
		function selectWH()
		{		    
//			var pos = getElementPos("warehouse");
//			//alert(pos.x + "    "+pos.y);
//						
//			document.getElementById("actionDiv").style.top = pos.y + 17;
//			document.getElementById("actionDiv").style.left = pos.x + 5;  
//			
//			document.getElementById("hiddenFlag").value = '1';
            
		}
		function changeStyle()
		{
		    var flag;
		    if(document.getElementById("henPerfStyle").value == 1)
		    {
		        flag = 2;		        
		    }
		    else if(document.getElementById("henPerfStyle").value == 2)
		    {
		        flag = 3;
		    }
		    else if(document.getElementById("henPerfStyle").value == 3)
		    {
		        flag = 4;
		    }
		    else if(document.getElementById("henPerfStyle").value == 4)
		    {
		        flag = 5;
		    }
		    else if(document.getElementById("henPerfStyle").value == 5)
		    {
		        flag = 6;
		    }
		    else
		    {
		        flag = 1;
		    }
		    window.location.href = 'WebForm_Logo.aspx?style='+flag;
		}
		   //显示DIV层
        function DivWindow() 
        { 
           parent.document.all.frame.cols   =  "0,7,*";  
           $('#WindowDiv').modal();
            self.parent.frames["main"].DivWindow();
            self.parent.frames["border"].document.getElementById('hdnType').vaule="1";  
            self.parent.frames["border"].document.getElementById('hdnClass').vaule=1;
            self.parent.frames["border"].document.getElementById('flag').className = "switch1";        
            document.getElementById("hdnWindowDiv").value = "1";             
        }
           //隐藏 DIV
        function DivClose()
        {
            $.modal.close();
        }
        function onLogout()
        {
            if(document.getElementById("hdnPerfLanguage").value == "zh")
            {
                if (confirm("确定要退出吗?")) {
                    if (document.getElementById('hdnLoginPageFrom').value == 'login') {
                        top.window.location.href = "login.aspx";
                    }
                    else 
                    {

                        top.window.location.href = "portal.aspx";
                    }
                }
            }
            else if(document.getElementById("hdnPerfLanguage").value == "en")
            {
                if(confirm("are you sure you want to quit?")) {
                    if (document.getElementById('hdnLoginPageFrom').value == 'login') {
                        top.window.location.href = "login.aspx";
                    }
                    else {

                        top.window.location.href = "portal.aspx";
                    }
                }
            }
        }
        
        //弹出系统关于页面
        function showAbout()
        {
            window.showModalDialog('About.aspx','','dialogWidth=521px;dialogHeight=341px;center=yes;resizable=no;status=no;')
        }


        
        //用户信息
        //弹出消息提示层
        function ShowMessageDiv(messageRowID,messageTitle,messageContent) {
            try {
                window.top.frames["main"].ShowMessageInfoDiv(messageRowID, messageTitle, messageContent);
                window.setTimeout(function() { CloseMessageDiv(); }, parseInt(document.getElementById("hdnUserMessageDisplayTime").value) * 1000); //消息信息显示的时间
            }
            catch (e)
            { }
        }
        //关闭消息提示层
        function CloseMessageDiv() {
            try {
                self.parent.frames["main"].CloseMessageInfoDiv();
            }
            catch (e)
            { }
        }        
    </script>
</head>
<body oncontextmenu = "return false">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div>
        <div style='display: none; width: 50%' id="WindowDiv">
        </div>
        <asp:UpdatePanel ID="up1" runat="server"><ContentTemplate>
            <div id="header">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td valign="bottom" class="header_L">
                            <table width="100%" height="54px" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="13" rowspan="2">
                                    </td>
                                    <td height="34" valign="top">
                                        <div onclick="hideshow();" runat="server" id="title_logo" style="cursor: hand" class="title_logo">
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td class="header_mid" align="left" valign="bottom">
                            <table width="100%" border="0" cellpadding="0">
                                <tr>
                                    <td valign="bottom" class="welcome" width="450">
                                        <table border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td width="300"><asp:Label ID="lblWelcome" runat="server"></asp:Label></td>
                                                <td width="21" align="left"><img id="messageImg" runat="server" src="Images/msgA.gif" onclick="javascript:self.parent.frames['main'].location.href='Administration/InMessageList.aspx?from=edit'" style="cursor:pointer" /></td>
												<td><asp:Label ID="lblUnreadMessageQty" runat="server" Text=""></asp:Label></td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td>
                                        <div id="warehouse" style="cursor: hand;" class="warehouse" onclick="DivWindow();">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="logout" id="logout" style="cursor: hand;" onclick="onLogout();">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="help" id="help" style="cursor: hand;">
                                        </div>
                                    </td>
                                    <td>
                                        <div class="about" id="about" style="cursor: hand;" onclick="showAbout();">
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td class="header_R">&nbsp;
                            
                        </td>
                        <td>
                            <div style="display:none;">
                                <asp:Button ID="btnServerTime" runat="server" OnClick="btnServerTime_Click" Width="0px" Height="0px" />
                                <asp:Label ID="lblServerTime" runat="server" Visible="false"></asp:Label>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate></asp:UpdatePanel>
    </div>
    <input type="hidden" id="hdnUserID" value="DBA" runat="server" />
    <input type="hidden" id="hdnCurrentWH" value="GLOBAL" runat="server" />
    <input type="hidden" id="hdnPerfLanguage" value="zh" runat="server" />
    <input type="hidden" id="hdnFullLanguageOption" value="zh-cn" runat="server" />
    <input type="hidden" id="henPerfStyle" value="2" runat="server" />
    <input type="hidden" id="hdnWindowDiv"  value="0" />
    <input type="hidden" id="hdnLoginPageFrom"  runat="server"  />
    <input type="hidden" id="hdnUserMessageTime"  runat="server" value=""  />
    <input type="hidden" id="hdnUserMessageDisplayTime"  runat="server" value=""  />
    <input type="hidden" id="hdnMessageDisplayNum"  runat="server" value="120"  /> <%-- 读取消息的时间间隔 --%>
    </form>
</body>
</html>
<script type="text/javascript">
        //获取服务器时间
        function getServerTime()
        {
            document.getElementById("btnServerTime").click();
        }
        window.setInterval("getServerTime()", parseInt(document.getElementById("hdnMessageDisplayNum").value) * 1000);
</script>
